﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace FourKill.Engine
{
    public class Coordinates3D : Coordinates2D, ICoordinates3D, ICloneable
    {
        private static Coordinates3D _origin = new Coordinates3D(0, 0, 0);
        public static new Coordinates3D Origin { get { return _origin; } }

        private double _z;

        public Coordinates3D() : base() { }
        public Coordinates3D(double x, double y, double z) : base(x, y) { Z = z; } 

        public double Z
        {
            get { return _z; }
            set { _z = value; }
        }

        public override object Clone()
        {
            return Coordinates3D.Clone(this);
        }

        public static Coordinates3D Clone(ICoordinates3D c)
        {
            Coordinates3D p = new Coordinates3D();
            p.X = c.X;
            p.Y = c.Y;
            p.Z = c.Z;
            return p;
        }

        public void CopyInto(ICoordinates3D c)
        {
            c.X = this.X;
            c.Y = this.Y;
            c.Z = this.Z;
        }

        public static void CopyInto(ICoordinates3D source, ICoordinates3D destination)
        {
            source.CopyInto(destination);
        }
    }
}
